﻿#pragma once

#include <QtWidgets/QWidget>
#include "ui_TcpServer.h"
#include <QByteArray>
#include <QDebug>
#include <QMessageBox>
#include <QHostAddress>
#include <QFile>
#include <QTcpsocket>

class TcpServer : public QWidget
{
    Q_OBJECT

public:
    TcpServer(QWidget *parent = nullptr);
    ~TcpServer();

    void loadConfig();

public slots:
    //恢复数据库
    void recoverDB();

private:
    Ui::TcpServerClass ui;
    QString m_strIP;
    quint16 m_usPort;

    // connect to server and exchange data with it
    QTcpSocket m_tcpSocket;
};
